package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentProductOrderClientFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cs-agent-provider", configuration = CsConfiguration.class, fallback = AgentProductOrderClientFallBack.class)
public interface AgentProductOrderClient {
    @RequestMapping(value = "/createAgentPlaceOrder", method = RequestMethod.POST)
    int createAgentPlaceOrder(@RequestBody  Map<String, Object> param);
    @RequestMapping(value = "/getPlaceOrderList", method = RequestMethod.POST)
    List<Map<String,Object>> getPlaceOrderList(@RequestParam("id") String id);
    @RequestMapping(value = "/updateAgentPlaceOrder", method = RequestMethod.POST)
    int updateAgentPlaceOrder(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/getOrderInfo", method = RequestMethod.POST)
    Map<String,Object> getOrderInfo(@RequestParam("id") String id);
}
